<template>
  <div id="container">
    <div class="content_mid">
      <dl class="c_section c_section_mid">
        <dt>
          <h2>
            <em></em>
            {{info.title}}
          </h2>
        </dt>
        <dd class="c_notice">
          <h4>{{info.content}}</h4>
          <a
            v-for="(item,index) in info.btnList"
            :key="index"
            class="greylink"
            href="javascript:void(0)"
            @click="toWhere(item.routerName)"
          >{{item.name}}</a>
        </dd>
      </dl>
    </div>
  </div>
  <!-- end #container -->
</template>
<!-- let info = {
    title:'填写公司信息',
    content:'您已成功提交申请，请耐心等待',
    btnList:[
        {
            name: '发布新职位',
            routerName:'publicJob'
        },
        {
            name: '发布新职位',
            routerName:'publicJob'
        },
    ]
}
this.$router.push({ name:'toast',params:{info:JSON.stringify(info)}}) -->
<!-- 传参示例 -->
<script>
export default {
  name: "toast",
  data() {
    return {
      info: {
        title: "",
        content: "",
        btnList: []
      }
    };
  },
  components: {},
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {
    if (this.$route.params.info) {
      let info = JSON.parse(this.$route.params.info);
      this.info = info;
      console.log(this.info.title);
    }
  },
  beforeUpdate() {},
  updated() {},
  beforeDestroy() {},
  destroy() {},
  toWhere(name) {
    this.$router.push({ name });
  }
};
</script>

<style scoped lang="less">
@import "./../../../public/less/main.less";
</style>
